import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/rb-service/service/trade/pos_trade/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getListCount = (params) => {
  return request({
    url: '/api/rb-service/service/trade/pos_trade/statistics',
    method: 'get',
    params: {
      ...params
    }
  })
}

/* 详情 */
export const getInfoDetail = (rptAisleOrderCode) => {
  return request({
    url: '/api/rb-service/service/trade/pos_trade/detail',
    method: 'get',
    params: {
      rptAisleOrderCode
    }
  })
}
/* 详情 登记商户*/
export const getPosDetail = (rptAisleOrderCode) => {
  return request({
    url: '/api/rb-service/service/trade/pos_trade/posDetail',
    method: 'get',
    params: {
      rptAisleOrderCode
    }
  })
}

/* 对账单 导出 */
export const getExport = (params) => {
  return request({
    /*headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',*/
    url: '/api/rb-service/service/trade/pos_trade/export',
    method: 'get',
    params: {
      ...params,
    }
  })
}


/* 申请退款 */
export const refundOrder = (row) => {
  return request({
    url: '/api/rb-service/service/trade/pos_trade/refundOrder',
    // url: '/api/rb-service/service/yspic/pic_ys/refundOrder',
    method: 'post',
    data: row
  })
}

export const serviceInfoSimpleList = (param) => {
  return request({
    url: '/api/rb-service/service/serviceinfo/service_info/simpleList',
    method: 'get',
    params: {...param}
  })
}

// 获取商户
export const getRpiNo= (params) => {
  return request({
    url: '/api/rb-service/service/incomingbasic/incoming_basic/list',
    method: 'get',
    params: {
      ...params,
      current:-1,
      size:-1
    }
  })
}

// 第三方补发通知
export const getNotify = (rptAisleOrderCode) => {
  return request({
    url: '/api/rb-service/service/trade/pos_trade/pushNotify',
    method: 'get',
    params: {
      rptAisleOrderCode
    }
  })
}

// 获取 客户经理
export const getAccountManager = (params) => {
  return request({
    url: '/api/rb-service/service/trade/pos_trade/customerManager',
    method: 'get',
    params: {
      ...params
    }
  })
}
